package com.mattgarner.jaddas.node;

public class NodeConfigurationManager {
	private static NodeConfigurationManager instance;
	private final double nodeVersion = 0.01;
	
	private int nodeUniqueID = 0xf4ec3a;
	
	private String basePath = "c:/tmp/jaddas";
	private String sysDataStore = basePath + "/sys";
	private String indexDataStore = basePath + "/indexes";
	private String dataDataStore = basePath + "/data";
	private String errorLog = basePath + "/nodeLog.txt";
	
	private int listenPort = 8412;
	public int maxConnectionWorkerThreads = 5;
	private String sharedAuthKeyClient = "qIm1k0Zi044faj4t";
	private String sharedAuthKeyNode = "Da3AXqP157j77231";
	
	public int consoleDebugLevel = 10;
	public int logDebugLevel = 10;
	
	public String stringEncoding = "UTF-8";
	
	
	public NodeConfigurationManager() {
	}
	
	// singleton method
	public final static NodeConfigurationManager getInstance() {
		if(instance == null) { 
			instance = new NodeConfigurationManager();
		}
		return instance;
	}
	
	// getters 
	public final String getSystemDataStore() {
		return sysDataStore;
	}
	
	public final String getIndexDataStore() {
		return indexDataStore;
	}
	
	public final String getDataDataStore() {
		return dataDataStore;
	}
	
	public final String getErrorLogFile() {
		return errorLog;
	}
	
	public final int getListenPort() {
		return listenPort;
	}
	
	public final double getNodeVersion() {
		return nodeVersion;
	}
	
	public final String getStringEncoding() {
		return stringEncoding;
	}
	
	public final String getAuthSharedKeyClient() {
		return sharedAuthKeyClient;
	}

	public final String getAuthSharedKeyNode() {
		return sharedAuthKeyNode;
	}
	
	public final int getUniqueNodeID() {
		return nodeUniqueID;
	}
	

}
